<div class="special-check main">
  <div class="pa-form-container shadowbox">
    <div class="container-header">
      专项检查
    </div>
    <div class="pa-form-content">
      <form class="clear" name="queryForm" novalidate>
        <div class="row"
          style="overflow: hidden;padding-bottom: 10px;">
          <div class="pa-form-control fl">
            <label for="name">任务名称:</label>
            <input type="text" name="name"
              ng-model="specialCheck.queryData.taskName">
          </div>
          <div class="pa-form-control fl">
            <label for="type">状态:</label>
            <select name="type"
              ng-model="specialCheck.queryData.status">
              <option value=""></option>
              <option value="0">未开始</option>
              <option value="1">进行中</option>
              <option value="2">待整改</option>
              <option value="3">已完成</option>
            </select>
          </div>
          <div class="pa-form-control fl">
            <label for="type">实施单位:</label>
            <select name="type" style="width: 200px;"
              ng-model="specialCheck.queryData.carryOutOrgId">
              <option
                ng-repeat="item in specialCheck.units"
                value="{{item.orgUnitId}}">
                {{item.orgUnitName}}
              </option>
            </select>
          </div>
          <div class="pa-form-control fl">
            <label for="name">制定单位:</label>
            <input type="text" name="name"
              ng-model="specialCheck.queryData.madeOrg" />
          </div>
        </div>
        <div class="row"
          style="overflow: hidden;padding-bottom: 10px;"  >
          <div class="pa-form-control fl">
            <label for="type">起始时间:</label>
            <input type="text" name="startDateFrom"
              ng-datepicker required
              ng-model="specialCheck.queryData.startDateFrom">
            到
            <input type="text" name="startDateTo"
              ng-datepicker required
              ng-model="specialCheck.queryData.startDateTo">
          </div>
          <div class="pa-form-control fl">
            <label for="type">结束时间:</label>
            <input type="text" name="endDateFrom" ng-datepicker required
              ng-model="specialCheck.queryData.endDateFrom">
            到
            <input type="text" name="endDateTo" ng-datepicker required
              ng-model="specialCheck.queryData.endDateTo">
          </div>
        </div>
        <a class="pa-float-btn reset-btn"
          ng-click="specialCheck.rest()">
          <i class="fa fa-repeat"></i>
          <span class="ml5">重置</span>
        </a>
        <a class="pa-float-btn query"
          ng-click="specialCheck.search(queryForm)">
          <i class="fa fa-search"></i>
          <span class="ml5">查询</span>
        </a>
      </form>
    </div>
  </div>
  <div class="pa-table-container shadowbox">
    <div class="operation-bar">
      <a class="pa-btn"
        ui-sref="arrangeTasks">
        安排任务
      </a>
      <div class="table-outer">
        <form class="base-info">
          <table class="pa-table">
            <thead>
              <tr>
                <th>任务名称</th>
                <th>状态</th>
                <th>制定单位</th>
                <th>实施单位</th>
                <th class="time-sequence">
                  <div>开始时间</div>
                  <div class="time-sequence-btn">
                    <div class="time-sequence-box"
                      ng-click="specialCheck.up('start_date','0')">
                      <i class="fa fa-caret-up"></i>
                    </div>
                    <div class="time-sequence-box"
                      ng-click="specialCheck.up('start_date','1')">
                      <i class="fa fa-caret-down"></i>
                    </div> 
                  </div>
                </th>
                <th class="time-sequence">
                  <div>结束时间</div>
                  <div class="time-sequence-btn">
                    <div class="time-sequence-box"
                      ng-click="specialCheck.up('end_date','0')">
                      <i class="fa fa-caret-up"></i>
                    </div>
                    <div class="time-sequence-box"
                      ng-click="specialCheck.up('end_date','1')">
                      <i class="fa fa-caret-down"></i>
                    </div> 
                  </div>
                </th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr
                ng-repeat="item in specialCheck.specialCheckList">
                <td>{{item.taskName}}</td>
                <td ng-class="{'nostart': item.status == '0',
                'ongoing': item.status == '1',
                'after-rectify': item.status == '2',
                'has-complete': item.status == '3'
                }">{{specialCheck.getCheckStatus(item.status)}}</td>
                <td>{{item.madeOrg}}</td>
                <td>{{item.carryOutOrg}}</td>
                <td>{{item.startDate1}}</td>
                <td>{{item.endDate1}}</td>
                <td>
                  <div class="del"
                    authorization-btn="api/securityActivities/specialCheck/addTask"
                    ng-click="$state.go('specialCheckItemList', {id: item.taskId});">
                    <i class="fa fa-street-view color"></i>
                    <span class="pointer">
                      查看
                    </span>
                  </div>
                  <div class="del"
                    ng-if="item.status == 0"
                    authorization-btn="api/securityActivities/specialCheck/deleteSpecialCheckById"
                    ng-click="specialCheck.deleteCheckItem(item)">
                    <i class="fa fa-trash color"></i>
                    <span class="pointer">
                      删除
                    </span>
                  </div>                                
                </td>
              </tr>
            </tbody>
          </table>
        </form>         
        <div class="total-num">
          共计<span class="total-num-colorful">
          {{specialCheck.paginationData.total}}</span>条
        </div>
        <div class="pagination-outer">
          <uib-pagination
            total-items="specialCheck.paginationData.total"
            ng-model="specialCheck.paginationData.pageNum"
            items-per-page="specialCheck.paginationData.pageSize"
            ng-change="pageChange()"
            class="pagination-sm"
            boundary-link-numbers="true"
            max-size="5"
            next-text="下一页"
            previous-text="上一页"></uib-pagination>
        </div>
      </div>
    </div>
  </div>
</div>